package org.example.design.abstractFactory.itf.impl;

import org.example.design.abstractFactory.itf.ICacheAdapter;
import org.example.design.abstractFactory.matter.IIR;

import java.util.concurrent.TimeUnit;

/**
 * @Classname IIRCacheAdapter
 * @Description IIR集群服务
 * @Date 2020/10/30 3:29 下午
 * @Created by xiangjd
 */
public class IIRCacheAdapter implements ICacheAdapter {

    private IIR iir = new IIR();

    @Override
    public String get(String key) {
        return iir.get(key);
    }

    @Override
    public void set(String key, String value) {
        iir.set(key, value);

    }

    @Override
    public void set(String key, String value, long timeout, TimeUnit timeUnit) {
        iir.setExpire(key, value, timeout, timeUnit);
    }

    @Override
    public void del(String key) {
        iir.del(key);
    }
}
